﻿using System;

class TrailingZero
{


    static void Main()
    {
        Console.WriteLine("13.Calculating for given N how many trailing zeros present at the end of the number N!.\n");
        Console.Write("Enter number for N: ");
        string inputString;
        int n;
        inputString = Console.ReadLine();
        n = int.Parse(inputString);
        int counter = 0;
        int pow = 1;
        int rezult = 0;
        bool zero = true;
        while (zero)
        {
            pow *= 5;
            rezult = n / pow;
            counter += rezult;
            if (rezult == 0)
            {
                zero = false;
            }
        }
        Console.WriteLine("There are {0} trailing zeros.", counter);

    }
}

